package fengchedm

import (
	"GraduationProject/public/models"
	"GraduationProject/public/params"
	"GraduationProject/worker/conf"
	"GraduationProject/worker/fengchedm/fengchedm_conf"
	"GraduationProject/worker/fengchedm/function"
	"fmt"
)

func Run(seed models.Record) (result params.Result, err error) {
	fmt.Println("fengchedm_run")
	switch seed.FunctionName {
	case fengchedm_conf.FengchedmCategory:
		return function.Category(seed), nil
	case fengchedm_conf.FengchedmAnime:
		return function.Anime(seed), nil
	case fengchedm_conf.FengchedmDetail:
		return function.Detail(seed), nil
	default:
		return result, conf.ErrDefault
	}
}
